package cate.game.display.po;

import cate.game.attr.FightAttr;
import cate.game.role.Role;
import cate.game.role.bag.awakenfairy.AwakenFairiesOn;
import cate.game.role.bag.equip.EquipsOn;
import cate.game.role.bag.exp.ExpsOn;
import cate.game.role.bag.fairy.FairiesOn;
import cate.game.role.bag.favorability.FavorabilityOn;
import cate.game.role.bag.furniture.FurnituresOn;
import cate.game.role.bag.hero.Hero;
import cate.game.role.bag.kitchenware.KitchenwaresOn;
import cate.game.role.bag.newtalent.NewTalentOn;
import cate.game.role.bag.rune.RunesOn;
import cate.game.role.bag.spice.SpicesOn;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;


@NoteClass(value = "观察时展示的英雄数据",detail = "和背包里的英雄有所区别 会包含属性战力")
public class WatchHero {

	@NoteField("英雄唯一id")
	public String uid;

	@NoteField("英雄tid")
	public int tid;

	@NoteField("等级")
	public int level;

	@NoteField("共享等级")
	public int shareLevel;

	@NoteField("英雄阶数")
	public int grade;

	@NoteField("共享阶数")
	public int shareGrade;

	@NoteField(value = "该英雄身上的装备")
	public EquipsOn equipsOn;

	@NoteField(value = "英雄身上的灵器")
	public FairiesOn fairiesOn;

	@NoteField(value = "英雄身上的觉醒灵器")
	public AwakenFairiesOn awakenFairiesOn;

	@NoteField(value = "英雄身上的徽章")
	public RunesOn runesOn;

	@NoteField(value = "英雄的手办")
	public FurnituresOn furnituresOn;

	@NoteField(value = "英雄的香料")
	public SpicesOn spicesOn;

	@NoteField(value = "英雄的天赋")
	public NewTalentOn newTalentOn;

	@NoteField(value = "英雄的好感度")
	public FavorabilityOn favorabilityOn;

	@NoteField("英雄的厨具")
	public KitchenwaresOn kitchenwaresOn;

	@NoteField("心得")
	public ExpsOn expsOn;

	@NoteField(value = "英雄的皮肤")
	public int skin;

	@NoteField(value = "英雄在背包里的战力", detail = "不包括上阵后的加成")
	public long power;

	@NoteField(value = "英雄在背包里的属性", detail = "不包括上阵后的加成")
	public FightAttr attr;

	public WatchHero() {
	}

	public WatchHero(Role role, Hero hero) {
		this.uid = hero.uid;
		this.tid = hero.tid;
		this.level = hero.level;
		this.shareLevel = hero.shareLevel;
		this.grade = hero.grade;
		this.shareGrade = hero.shareGrade;
		this.equipsOn = hero.equipsOn;
		this.fairiesOn = hero.fairiesOn;
		this.awakenFairiesOn = hero.awakenFairiesOn;
		this.runesOn = hero.runesOn;
		this.furnituresOn = hero.furnituresOn;
		this.spicesOn = hero.spicesOn.copy();
		this.spicesOn.gainSpiceData();
		this.newTalentOn = hero.newTalentOn;
		this.favorabilityOn = hero.favorabilityOn;
		this.kitchenwaresOn = hero.kitchenwaresOn;
		this.expsOn = hero.expsOn;
		this.power = hero.getPower((role.getGame().fight.getPlayBuildContext()));
		this.skin = role.getShow().heroSkin.illustrate.getHeroSkin(hero.getTpl(role.getGame().fight.getPlayBuildContext()).protoId);
		this.attr = hero.attr;
	}
}
